import static org.junit.Assert.*;

import org.junit.Test;


public class ColaAlumnosTest {

	@Test
	public final void testAdd() {
		ColaAlumnos cola = new ColaAlumnos(new CarneComparator());
		assertEquals(cola.size(), 0);
		cola.add(new Alumno("pedro", 5, 25, 1991, 5, 5));
		cola.add(new Alumno("juan", 5, 25, 1991, 5, 5));
		assertEquals(cola.size(), 2);
	}

	@Test
	public final void testRemove() {
		ColaAlumnos cola = new ColaAlumnos(new CarneComparator());
		assertEquals(cola.size(), 0);
		cola.add(new Alumno("pedro", 5, 25, 1991, 5, 5));
		cola.add(new Alumno("juan", 5, 25, 1991, 5, 5));
		assertEquals(cola.size(), 2);
		cola.remove();
		assertEquals(cola.size(), 1);
		cola.remove();
		assertEquals(cola.size(), 0);
	}

	@Test
	public final void testGetFirst() {
		ColaAlumnos cola = new ColaAlumnos(new CarneComparator());
		assertEquals(cola.size(), 0);
		cola.add(new Alumno("pedro", 5, 25, 1991, 5, 5));
		cola.add(new Alumno("juan", 5, 25, 1991, 5, 5));
		assertEquals(cola.size(), 2);
		cola.getFirst();
		assertEquals(cola.size(), 2);
		cola.getFirst();
		assertEquals(cola.size(), 2);

	}

	@Test
	public final void testSize() {
		ColaAlumnos cola = new ColaAlumnos(new CarneComparator());
		assertEquals(cola.size(), 0);
		cola.add(new Alumno("pedro", 5, 25, 1991, 5, 5));
		cola.add(new Alumno("juan", 5, 25, 1991, 5, 5));
		assertEquals(cola.size(), 2);
		cola.getFirst();
		assertEquals(cola.size(), 2);
		cola.remove();
		assertEquals(cola.size(), 1);
	}

	@Test
	public final void testIsEmpty() {
		ColaAlumnos cola = new ColaAlumnos(new CarneComparator());
		assertEquals(cola.isEmpty(), true);
		cola.add(new Alumno("pedro", 5, 25, 1991, 5, 5));
		cola.add(new Alumno("juan", 5, 25, 1991, 5, 5));
		assertEquals(cola.isEmpty(), false);
		cola.getFirst();
		assertEquals(cola.isEmpty(), false);
		cola.remove();
		cola.remove();
		assertEquals(cola.isEmpty(), true);

	}

	@Test
	public final void testClear() {
		ColaAlumnos cola = new ColaAlumnos(new CarneComparator());
		cola.add(new Alumno("pedro", 5, 25, 1991, 5, 5));
		cola.add(new Alumno("juan", 5, 25, 1991, 5, 5));
		assertEquals(cola.isEmpty(), false);
		cola.clear();
		assertEquals(cola.isEmpty(), true);
	}

}
